﻿<UserControl x:Class="Views.ViewEncoursStats"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignHeight="402" d:DesignWidth="602" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:igCA="http://infragistics.com/Chart">
    <UserControl.Resources>
      
    </UserControl.Resources>
    <!--DataContext="{Binding Source={x:Static VMtxgar:Locator.ViewModelCmdEncoursStatsStatic}}"-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        
        <Button Margin="5" Padding="5" Content="Raffraichir" HorizontalAlignment="Left" Background="White" Focusable="False" Command="{Binding UpdateCommand}" />
        
        <igCA:XamChart xml:lang="fr-FR" Grid.Column="1" Grid.Row="2">
        	<igCA:XamChart.Axes>
        		<igCA:Axis AxisType="PrimaryY">
        			<igCA:Axis.Label>
        				<igCA:Label Format="{}{0:0%}"/>
        			</igCA:Axis.Label>
        		</igCA:Axis>
        	</igCA:XamChart.Axes>
            <igCA:XamChart.Legend>
                <igCA:Legend Visible="False"  />
            </igCA:XamChart.Legend>
            <igCA:XamChart.Caption>
                <igCA:Caption Text="Taux nominaux pondérés par les CSR"/>
            </igCA:XamChart.Caption>
            <igCA:XamChart.Series>
                <igCA:Series DataSource="{Binding TauxNominauxPonderee}" DataMapping="Value=Value;Label=Label" DataPointColor="Different">
                	<igCA:Series.Marker>
                		<igCA:Marker Format="{}{0:0.00%}"/>
                	</igCA:Series.Marker>
                </igCA:Series>
            </igCA:XamChart.Series>
        </igCA:XamChart>

        <igCA:XamChart  xml:lang="fr-FR" Grid.Row="2">
            <igCA:XamChart.Legend>
                <igCA:Legend HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Focusable="False"/>
            </igCA:XamChart.Legend>
            <igCA:XamChart.Caption>
                <igCA:Caption Text="Capitaux sous risque par tranche d'ages"/>
            </igCA:XamChart.Caption>
            <igCA:XamChart.Series>
                <igCA:Series DataSource="{Binding CsrParAge}" DataMapping="Value=Value;Label=Label" ChartType="Pie">
                    <igCA:Series.Marker>
                        <igCA:Marker Format="{}{Value:0%}"/>
                    </igCA:Series.Marker>
                </igCA:Series>
            </igCA:XamChart.Series>
        </igCA:XamChart>

        <igCA:XamChart  xml:lang="fr-FR" Grid.Column="1" Grid.Row="1">
            <igCA:XamChart.Legend>
                <igCA:Legend Visible="False"/>
            </igCA:XamChart.Legend>
            <igCA:XamChart.Caption>
                <igCA:Caption Text="Durées à la  souscription pondérées par les CSR"/>
            </igCA:XamChart.Caption>
            <igCA:XamChart.Series>
                <igCA:Series DataSource="{Binding DureeSouscriptionPonderee}" DataMapping="Value=Value;Label=Label" DataPointColor="Different">
                	<igCA:Series.Marker>
                		<igCA:Marker Format="{}{Value:N0} Mois"/>
                	</igCA:Series.Marker>
                </igCA:Series>
            </igCA:XamChart.Series>
        </igCA:XamChart>

        <igCA:XamChart  xml:lang="fr-FR" Grid.Row="1">
            <igCA:XamChart.Legend>
                <igCA:Legend HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Focusable="False"  />
            </igCA:XamChart.Legend>
            <igCA:XamChart.Caption>
                <igCA:Caption Text="Capitaux sous risque par type de pret"/>
            </igCA:XamChart.Caption>
            <igCA:XamChart.Series>
                <igCA:Series DataSource="{Binding CsrParPret}" DataMapping="Value=Value;Label=Label" ChartType="Pie">
                    <igCA:Series.Marker>
                        <igCA:Marker Format="{}{Value:0%}" />
                    </igCA:Series.Marker>
                </igCA:Series>
            </igCA:XamChart.Series>
        </igCA:XamChart>
    </Grid>
</UserControl>
